package com.example.demo.listener;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.example.demo.entity.Category;
import lombok.extern.slf4j.Slf4j;

/**
 * @Author GuoMingXi @Email guomingxi2018@163.com
 * @Create 2022/5/30 20:25
 * @Version V1.0
 */
@Slf4j
public class CategoryReadListener extends AnalysisEventListener<Category> {
    @Override
    //每读一行，都会调用一次invoke
    public void invoke(Category data, AnalysisContext context) {
        log.info("data："+data);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext context) {

    }
}
